package cn.dengta.webapp.user.model;

import cn.dengta.common.model.ValueProxy;
import cn.dengta.common.model.ValueProxyImpl;
import lombok.Getter;

/**
 * 学历 枚举
 */
@Getter
public enum Education implements ValueProxyImpl<Education, Integer> {
	PRIMARY("小学"),
	JUNIOR("初中"),
	HIGH("高中"),
	JUNIOR_COLLEGE("大专"),
	BACHELOR("本科"),
	POSTGRADUATE("研究生"),
	DOCTOR("博士"),
	POST_DOCTORATE("博士后"),
	;
	public Integer value;
	final ValueProxy<Education, Integer> proxy;


	Education(String label) {
		this.value = ordinal();
		this.proxy = new ValueProxy<>(this, ordinal(), label);
	}

	public static Education of(Integer value) {
		return PRIMARY.getValueOf(value);
	}
}
